package com.ssh.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ssh.dao.UserDao;
import com.ssh.entity.Address_List;
import com.ssh.entity.User;
@Service
public class UserServiceImpl implements UserService {
	@Autowired
	private UserDao userDao;
	@Override
	public void register(User user) {
		userDao.save(user);
	}
	@Override
	public List<User> login(String username, String password) {
		return userDao.SelectUser(username, password);
	}
	@Override
	public List<Address_List> selectAll() {
		return userDao.selectAll();
	}
	@Override
	public Address_List selectOne(Integer id) {
		return userDao.selectOne(id);
	}
	@Override
	public void delete(Integer id) {
		userDao.delete(id);
	}
	@Override
	public void update(Address_List al) {
		userDao.update(al);
	}
	@Override
	public void save(Address_List al) {
		userDao.save(al);
	}
	@Override
	public List<Address_List> select(String str) {
		return userDao.select(str);
	}
	

}
